<template>
	<scroll-view class="scroll-view_H" scroll-x="true" :style='style_item' >
		<view class="flex_heng"> 
			<view v-for="(item,index) in list" :key="index" @click="coupon_record(item.id)" class="scroll-view-item_H">
				<view class="coupon_left">
					<view class="coupon_left_dian"></view>
					<view class="coupon_left_dian2"></view>
					¥{{item.money}}
				</view>
				<view class="coupon_right">
					<span class="coupon_right_title">{{item.title}}</span>
					<span>{{item.remark}}</span>
				</view>
			</view>
		</view>
	</scroll-view>
</template>

<script>
	export default {
		props: {
			// 缺省图
			list:{
				type: Array,
				default: []
			},
			style_item: {
				type: Object,
				default: () => ({})
			},
		},
		data() {
			return {
				search_text:''
			}
		},
		methods: {
			coupon_record(id){
				var data = {
					coupon_id:id,
				}
				this.$wqzApi.UserCoupon_coupon_record(data).then(res=>{
					uni.showToast({
						title:'领取成功',
						icon:'none'
					})
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import url(./couponlist.css);
</style>